﻿function FavoriteProjectViewModel(model) {
    var selfModel = this;

    ko.mapping.fromJS(model, {}, selfModel);

    selfModel.List = new ListViewModel();
    
    selfModel.SourceTest = function () {
        var method = whoever.AJAX.Method({
            data: {},
            action: "/Project/RebindList"
        });

        method.success(function (Items) {
            ko.mapping.fromJS(Items, {}, selfModel.List.Items);
        });
    };

    selfModel.SourceTest();
    
    Main.Page.Init("Info", "FavoriteProject");
}